Optimal. Leaf size=204 \[ \frac{2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c^2 f g (m-n) (m-n+2) (m-n+4)}+\frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}+\frac{2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{c f g (m-n+2) (m-n+4)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.665382, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 45, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.044, Rules used = {2849, 2848} \[ \frac{2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c^2 f g (m-n) (m-n+2) (m-n+4)}+\frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}+\frac{2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{c f g (m-n+2) (m-n+4)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2849
Rule 2848
Rubi steps
\begin{align*} \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n} \, dx &=\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac{2 \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n} \, dx}{c (4+m-n)}\\ &=\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac{2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{c f g (2+m-n) (4+m-n)}+\frac{2 \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx}{c^2 (2+m-n) (4+m-n)}\\ &=\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac{2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{c f g (2+m-n) (4+m-n)}+\frac{2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{c^2 f g (m-n) (2+m-n) (4+m-n)}\\ \end{align*}
Mathematica [A] time = 30.0394, size = 183, normalized size = 0.9 \[ \frac{2^{n-2} \cos (e+f x) \sin ^{2 n-4}\left (\frac{1}{2} \left (-e-f x+\frac{\pi }{2}\right )\right ) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^{-2 (n-2)} (g \cos (e+f x))^{-m-n-1} \left (-2 (m-n+2) \sin (e+f x)+\cos \left (2 \left (-e-f x+\frac{\pi }{2}\right )\right )+m^2-2 m n+4 m+n^2-4 n+3\right )}{f (m-n) (m-n+2) (m-n+4)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.636, size = 0, normalized size = 0. \begin{align*} \int \left ( g\cos \left ( fx+e \right ) \right ) ^{-1-m-n} \left ( a+a\sin \left ( fx+e \right ) \right ) ^{m} \left ( c-c\sin \left ( fx+e \right ) \right ) ^{-2+n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.90677, size = 460, normalized size = 2.25 \begin{align*} -\frac{{\left (2 \, \cos \left (f x + e\right )^{3} + 2 \,{\left (m - n + 2\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) -{\left (m^{2} - 2 \,{\left (m + 2\right )} n + n^{2} + 4 \, m + 4\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{-m - n - 1}{\left (a \sin \left (f x + e\right ) + a\right )}^{m} e^{\left (2 \,{\left (n - 2\right )} \log \left (g \cos \left (f x + e\right )\right ) -{\left (n - 2\right )} \log \left (a \sin \left (f x + e\right ) + a\right ) +{\left (n - 2\right )} \log \left (\frac{a c}{g^{2}}\right )\right )}}{f m^{3} - f n^{3} + 6 \, f m^{2} + 3 \,{\left (f m + 2 \, f\right )} n^{2} + 8 \, f m -{\left (3 \, f m^{2} + 12 \, f m + 8 \, f\right )} n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (g \cos \left (f x + e\right )\right )^{-m - n - 1}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (-c \sin \left (f x + e\right ) + c\right )}^{n - 2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]